﻿using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Threading.Tasks;

namespace test1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            List<Task> tasks = new List<Task>();
            ConcurrentDictionary<long, int> bag = new ConcurrentDictionary<long, int>();
            for (int i = 0; i < 20; i++)
            {
                tasks.Add(Task.Factory.StartNew(() => {
                   var id = CRC32Cls.GetCRC32Str("D610117001_D510132001_20220226_BCD-400EGX5S_C0000050_18_ST_INV_V35");
                    Console.WriteLine(CRC32Cls.to62HEX("_20220226_BCD-400EGX5S_C0000050_18_ST_INV_V35"));
                    bag.TryAdd(id, i);
                }));
            }
            Task.WhenAll(tasks).Wait();
            foreach (var b in bag)
            {
                Console.WriteLine($"{b.Key}_{b.Value}");
            }
        }
    }
}
